<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="author" content="甘忠祥">
    <title>订单</title>
    <style>
        .box{
            width: 500px;
            height: 800px;
            border: 1px solid black;
            margin: 50px auto;
        }
        ul{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        .xiaoshou{
            width: 150px;
            height: 50px;
            background-color: #aaa;
            text-align: center;
            line-height: 50px;
            margin: 100px;
            cursor: pointer;
        }
        .xiaofei{
            width: 150px;
            height: 50px;
            background-color: lightgoldenrodyellow ;
            text-align: center;
            line-height: 50px;
            margin-left: 250px;
            margin-top: -150px;
            cursor: pointer;
        }
        .text{
            /* background-color: darkcyan; */
            width: 100px;
            height: 50px;
            margin: 200px;
            border: 1px solid dodgerblue;
            text-align: center;
            line-height: 50px;
        }
        ul li:hover{
            background-color: lightgrey;
            cursor: pointer;
        }
    </style>
</head>
    
<body>
    <div class="box">
        <div class="xiaoshou">销售订单
            <ul>
                <li>销售1</li>
                <li>销售2</li>
                <li>销售3</li>
                <li>销售4</li>
            </ul>
        </div>
        <div class="xiaofei">消费订单
            <ul>
                <li>订单1</li>
                <li>订单2</li>
                <li>订单3</li>
                <li>订单4</li>
            </ul>
        </div>
        <div class="text"></div>
    </div>
    
<script src="./jquery.min.js"></script>
</body>
<script>
    $('.xiaoshou ul').hide();
    $('.xiaofei ul').hide();
    $('.xiaoshou').click(function(){
        $('.xiaoshou ul').show();
    })
    $('.xiaofei').click(function(){
        $('.xiaofei ul').show();
    })
    $('ul li').click(function(ev){
        ev.stopPropagation();
        $('.text').html($(this).html());
        $('ul').hide();
    })
    
</script>
</html>